package main.java.service;

import main.java.dao.UserMapper;
import main.java.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImp implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

//    @Override
//    public int updateUser(User user) {
//        return userMapper.updateUser(user);
//    }

    @Override
    public User queryUserByUsername(String username) {
        return userMapper.queryUserByUsername(username);
    }

    @Override
    public Integer countUser() {
        return userMapper.countUser();
    }
}
